/* 开发工具页面样式 */
:root {
    --primary: #1a4b8c;
    --secondary: #ff6b35;
    --light: #f5f7fa;
    --dark: #2d3748;
    --gray: #718096;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-tools {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

/* JSON格式化工具样式 */
.json-formatter {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.formatter-input, .formatter-output {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    background-color: #f9f9f9;
}

.formatter-input textarea {
    width: 100%;
    min-height: 200px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    border: none;
    background: transparent;
    resize: vertical;
}

.formatter-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

#jsonOutput {
    margin: 0;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
}

/* 代码编辑器样式 */
.code-editor {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.editor-actions {
    padding-left: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.editor-container {
    display: flex;
    height: 500px;
}

.editor {
    flex: 1;
    border-right: 1px solid #ddd;
}

.output {
    flex: 1;
    padding: 1rem;
    overflow: auto;
    background-color: white;
}

/* CodeMirror编辑器样式覆盖 */
.CodeMirror {
    height: 100% !important;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .editor-container {
        flex-direction: column;
        height: auto;
    }
    
    .editor {
        border-right: none;
        border-bottom: 1px solid #ddd;
        height: 300px;
    }
    
    .output {
        height: 200px;
    }
    
    .editor-header, .formatter-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}